package 每日一题;

import java.util.Scanner;

public class 倒置字符串 {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        String str=sc.nextLine();
        System.out.println(fun(str));
    }

    private static String fun(String str) {
        if (str==null || str.length()==0) {
            return null;
        }
        StringBuilder sb=new StringBuilder();
        String[] strings = str.split(" ");
        for (int i = strings.length-1; i >=0 ; i--) {
            sb.append(strings[i]);
            sb.append(" ");
        }


        return sb.toString();
    }
}
